RCS "$Id: Env.sig,v 1.10 1998/08/13 11:34:58 pxs Exp $";
(************************************ Env ************************************)
(*                                                                           *)
(*  Module for Environments.                                                 *)
(*                                                                           *)
(*****************************************************************************)

signature ENV =
sig
   type 'a env

   exception Unbound

   val empty      : unit -> '1a env
   val isempty    : 'a env -> bool
   val isBound    : V.var * 'a env -> bool
   val lookup     : V.var * 'a env -> 'a
   val bind       : V.var * 'a * 'a env -> 'a env
   val unbind     : V.var * 'a env -> 'a env
   val map        : ('a -> '_b) -> 'a env -> '_b env
   val exists     : (V.var * 'a -> bool) -> 'a env -> bool
   val forall     : (V.var * 'a -> bool) -> 'a env -> bool
   val merge      : 'a env * 'a env -> 'a env
(* the fn says what to do if both envs bind the same var *)
   val merge1     : ('2a * '2a -> '2a) -> '2a env * '2a env -> '2a env
   val getvars    : 'a env -> V.var list (* redundant *)
   val listItems  : 'a env -> (V.var * 'a) list	(* in no particular order *)
   val listAlphabetical : 'a env -> (V.var * 'a) list
   val eq         : ('a * 'a -> bool) -> 'a env * 'a env -> bool
(*   val le         : ('a * 'a -> bool) -> 'a env * 'a env -> bool*)
end
